package com.tengju.bff.interfaces.covercharge.constant;
/**
 * 乐税第三方返回结果枚举
 *
 * @author cj
 */
public enum LetaxReturnCodeEnum {
    SUCCESS("00","成功"),
    FAILURE("99","失败");

    private String code;
    private String desc;

    LetaxReturnCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static String getDesc (String code){
        for(LetaxReturnCodeEnum letaxReturnCodeEnum : (LetaxReturnCodeEnum.values())){
            if(letaxReturnCodeEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return letaxReturnCodeEnum.getDesc();
            }
        }
        return null;
    }
}
